
export const columns = ctx => {
  return [
    {
      prop: 'cinemaName',
      label: '影院名称'
    },
    {
      prop: 'cinemaCode',
      label: '影院编码'
    },
    {
      prop: 'interfaceName',
      label: '系统商'
    },
    {
      prop: 'cinemaLineName',
      label: '院线'
    },
    {
      label: '地区',
      render: (h, row) => {
        return [
          <span>{row.provinceName}-{row.cityName}-{row.countyName}</span>
        ]
      }
    },
    {
      label: '操作',
      render: (h, row, index) => {
        return [
          <el-link
            underline={false}
            type="primary"
            class="mr10"
            onClick={() => { ctx.handleDel(row.id) }}
          >
            移除
          </el-link>
        ]
      }
    }
  ]
}
// chooseFilm组件
export const chooseFilmColumns = ctx => {
  return [
    {
      prop: 'isChecked',
      minWidth: 80,
      width: 80,
      label: '全选',
      renderHead (h, { column, $index }) {
        return (
          <el-checkbox
            value={ctx.isCheckAll}
            onChange={e => {
              ctx.selectAll(e)
            }}
            indeterminate={!ctx.isCheckAll}
          >
            {ctx.isCheckAll ? '全不选' : '全选'}
          </el-checkbox>
        )
      },
      render (h, row, index) {
        return (
          <el-checkbox
            value={row.isChecked}
            onChange={e => {
              ctx.selectRow(e, row, index)
            }}
          />
        )
      }
    },
    {
      prop: 'cinemaName',
      label: '影院名称'
    },
    {
      prop: 'cinemaCode',
      label: '影院编码'
    },
    {
      prop: 'interfaceName',
      label: '系统商'
    },
    {
      prop: 'cinemaLineName',
      label: '院线'
    },
    {
      label: '地区',
      render: (h, row) => {
        return [
          <span>{row.provinceName}-{row.cityName}-{row.countyName}</span>
        ]
      }
    }
  ]
}
